Magnetic disk controller which avoids erroneous write operations to ZBR-type magnetic disks upon detection of a next sector mark from the ZBR magnetic disk

ABSTRACT

In a sector mark waiting stage, when a sector mark detecting signal is input to a magnetic disk controller, the magnetic disk controller initiates a write operation of sector data on a magnetic disk. In a non-sector mark waiting state, when a sector mark detecting signal is input to the magnetic disk controller, the magnetic disk controller stops the write operation of sector data upon the magnetic disk being performed.

This application is a division of application Ser. No. 08/139,789, filedOct. 22, 1993, pending.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a magnetic disk controller for a zonebit recording (ZBR)-type magnetic disk.

2. Description of the Related Art

Generally, a magnetic disk unit includes one or more magnetic disksmounted on one spindle, and one read/write head is provided on each ofthe two surfaces of each magnetic disk. Also, the surface of themagnetic disk is divided into a plurality of tracks, i.e., concentriccircles depicted by a locus of the magnetic head on the magnetic diskalong the spindle. In this case, a cylinder is defined by a plurality oftracks simultaneously determined by a plurality of magnetic heads.Further, a track is divided into a plurality of sectors, a sector beinga minimum unit to be accessed. One logical address, which is called anidentification address (ID), is allocated to each of the sectors. Inthis case, an ID is defined by a head number, a cylinder number, asector number, and the like. Thus, reading/writing operation to themagnetic disks can be carried out by indicating the head number, thecylinder number, the sector number, and the like. Also, in order toincrease the storage capacity of the magnetic disks, a ZBR system hasbeen suggested. According to the ZBR system, every surface on themagnetic disks is divided into a plurality of concentrically-shapedzones each having a different number of sectors. That is, the number ofsectors is larger in an outer zone than in an inner zone, to therebymake the recording density uniform over the entire magnetic disk.

On the other hand, according to a prior art magnetic disk controller forperforming a write operation of sector data in each sector, in a sectormark waiting state where a sector mark is expected to be detected, whena sector mark is detected, a write operation of sector data in a desiredsector of a magnetic disk is initiated.

In the above-mentioned prior art magnetic disk controller, however, ifthe location of a magnetic head deviates while performing a writeoperation of sector data upon the desired sector, an erroneous writeoperation may be performed upon another sector possibly causingunexpected erasure of data therein, which will be explained later indetail.

SUMMARY OF THE INVENTION

It is, therefore, an object of the present invention to reduce thepossibility of an erroneous write operation due to the deviation of thelocation of a magnetic head in a ZBR-type magnetic disk.

According to the present invention, in a sector mark waiting state, whena sector mark detecting signal is input to a magnetic disk controller,the magnetic disk controller initiates a write operation of sector dataon a magnetic disk. On the other hand, in a non-sector mark waitingstate, when a sector mark detecting signal is input to the magnetic diskcontroller, the magnetic disk controller stops the write operation ofsector data on the magnetic disk that is currently being performed.Thus, if the location of a magnetic head deviates to an adjacent zone,to effect an erroneous write operation thereon, this erroneous writeoperation is stopped upon detection of the next sector mark.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be more clearly understood from thedescription as set forth below, in comparison with the prior art, withreference to the accompanying drawings, wherein:

FIG. 1 is a plan view illustrating a surface of a ZBR-type magneticdisk;

FIG. 2 is a partial enlargement of FIG. 1;

FIG. 3 is a block diagram illustrating a prior art magnetic diskcontroller;

FIGS. 4, 5 and 7 are flowcharts showing the operation of the sequencerof FIG. 3;

FIGS. 6A, 6B and 6C are timing diagrams showing the operation of thesequencer of FIG. 3;

FIG. 8 is a block diagram illustrating a first embodiment of themagnetic disk controller according to the present invention;

FIG. 9 is a block circuit diagram illustrating a second embodiment ofthe magnetic disk controller according to the present invention;

FIGS. 10, 11 and 12 are flowcharts showing the operation of thesequencer of FIG. 9; and

FIGS. 13A, 13B and 13C are timing diagrams showing the operation of thesequencer of FIG. 9.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Before the description of embodiments of the present invention, aZBR-type magnetic disk and a prior art magnetic disk controller will nowbe explained with reference to FIGS. 1 through 7.

In FIG. 1, which illustrates a surface of a ZBR-type magnetic disk,reference numeral 110 designates a magnetic disk whose surface isdivided into a plurality of zones 121, 122, 123, . . . , each dividedinto a plurality of tracks. In this case, the number of sectors in onetrack is fixed within one of the zones. For example, the number ofsectors in one track is 16 within the zone 121, and the number ofsectors in one track is 20 within the zone 122. That is, the number ofsectors in one track is larger in an outer zone than an inner zone,since the circumferential length of an outer zone is larger than that ofan inner zone.

In FIG. 2, which is an enlargement of a portion X of FIG. 1, a track 131of the zone 121 and a track 132 of the zone 122 are illustrated. In thiscase, a leading edge A of a fifth sector in the track 131 coincides witha leading edge B of a sixth sector in the track 132, while a trailingedge C of the fifth sector in the track 131 does not coincide with atrailing edge D of the sixth sector in the track 132.

Here, it is considered that the deviation of a location of the magnetichead (not shown) occurs due to the vibration of the magnetic disk unit(not shown), a malfunction of the servo mechanism (not shown), or adefect in the medium, and as a result, the magnetic head is moved fromthe track 131 to the track 132. For example, the location of themagnetic head on the magnetic disk 110 immediately before the deviationis indicated by E, and the location of the magnetic head on the magneticdisk 110 immediately after the deviation is indicated by F. Thus, inthis example, the magnetic head is moved from the location E of thefifth sector in the track 131 to the location F of the sixth sector inthe track 132.

In FIG. 3, which illustrates a prior art magnetic disk controller, amagnetic disk controller 1 is interposed between a central processingunit (CPU) 2 and a magnetic disk interface 3 which is connected to aread/write magnetic head 4. Note that a plurality of magnetic heads canbe provided for a plurality of magnetic disks; however, in order tosimplify the description, only one magnetic head is provided in thisexample.

The magnetic disk controller 1 includes a sequencer 11 and an ANDcircuit 12. The AND circuit 12 receives a sector mark detecting signalSMD signalling a border between the sectors from the magnetic diskinterface 3 and a sector mark waiting signal SMW from the sequencer 11,to thereby generate an ID data read control signal IRD.

Note that the sequencer 11 includes a parallel-to serial converter forwriting data via the magnetic disk interface 3 onto the magnetic disk110 (see FIG. 1), a serial-to-parallel converter for reading data viathe magnetic disk interface 3 from the magnetic disk 110, a randomaccess memory (RAM) and the like, which are not shown. Thus, abidirectional data line DA is connected between the sequencer 11 and themagnetic disk interface 3.

The sector mark waiting signal SMW is generated by the sequencer 11using the logic shown in FIG. 4. A SMW routine of FIG. 4 is initiated byturning ON the magnetic disk controller 1. Steps 401 through 404 carryout an initialization. That is, at step 401, the sector mark waitingsignal SMW is made active ("1"), and at step 402, the sequencer 11 waitsfor a first sector mark detecting signal SMD which is, in this case, afirst ID data read control signal IRD due to the activation of thesector mark waiting signal SMW. Once the first ID data read controlsignal IRD is made active, the control proceeds to step 403 which makesthe sector mark waiting signal SMW inactive. Then, at step 404, a sectorinterval value N0 is read out of the RAM in dependence with thecurrently accessed zone and is set in a counter CNT0. Thus, the counterCNT0 is initialized to be counted down by a time interrupt routine asillustrated in FIG. 5 which is carried out at predetermined timeintervals. Note that the sector interval value N0 corresponds to asector interval T0 as shown in FIG. 6A. Thus, an initialization for thefirst sector mark detecting signal SMD is completed.

At step 405, it is determined whether or not the value of the counterCNT0 reaches zero, i.e., whether or not a sector interval T0 has passed.Only when the sector interval T0 has passed, does the control proceed tostep 406 which activates the sector mark waiting signal SMW (SMW="1") asshown in FIG. 6C.

At step 407, a sector interval value N0 is read out of the RAM independence with the currently accessed zone and is set in the counterCNT0. Also, at step 408, a sector mark waiting signal width value N1 isread out of the RAM in dependence with the currently accessed zone andis set in a counter CNT1. Thus, both the counters CNT0 and CNT1 areinitialized to be counted down by the routine as illustrated in FIG. 5.Note that the sector mark waiting signal width value N1 corresponds to asector mark waiting signal width T1 as shown in FIG. 6B.

At step 408, it is determined whether or not the value of the counterCNT1 reaches zero, i.e., whether or not a sector mark waiting signalwidth T1 has passed. Only when the sector mark waiting signal width T1has passed, does the control proceed to step 410 which deactivates thesector mark waiting signal SMW (SMW="0") as shown in FIG. 6C.

Hereinafter, steps 405 through 410 are repeated, thus, the sector markwaiting signal SMW as shown in FIG. 6C is repeatedly set and reset.

In FIG. 5, note that the counter CNT0 is decremented by 1 at step 501,and the value of the counter CNT0 is guarded by 0 at steps 502 and 503.Similarly, the counter CNT1 is decremented by 1 at step 504, and thevalue of the counter CNT1 is guarded by 0 at steps 505 and 506. Theroutine of FIG. 5 is completed by step 507.

In an active state of the sector mark waiting signal SMW (SMW="1"), whena sector mark is detected to activate the sector mark detecting signalSMD (i.e., SMD="1"), the output of the AND circuit 12 becomes active("1"), i.e., the ID data read control signal IRD becomes active ("1"),thus moving the control from a sector mark waiting state to an ID dataread and sector data write state which is shown in FIG. 7.

Referring to FIG. 7, at step 701, the sequencer 11 reads ID dataincluding a head number, a cylinder number which is, in this case,formed by a zone number and a track number, and a sector number on thedata DA from the magnetic disk interface 3, and at step 702, it isdetermined whether or not a desired sector such as the fifth sector ofthe track 131 in the zone 121 is accessed. As a result, only when thedesired sector is accessed, does the control proceed to step 703 whichperforms a write operation of sector data in the fifth sector of thetrack 131 in the zone 121 of the magnetic disk 110. Otherwise, thecontrol proceeds to step 704. This routine is completed by step 704.

In a sector data write state at step 703 of FIG. 7, however, even if themagnetic head is moved from the location E of the fifth sector of thetrack 131 to the location F of the sixth sector of the track 132, thewriting operation of sector data in the sixth sector of the track 132continues. As a result, when the magnetic head 2 reaches the location Dof the sixth sector of the track 132, a sector mark is detected toactivate the sector mark detecting signal SMD. Even in this case, sincethe sector mark waiting signal SMW is inactive, the output of the ANDcircuit 12, i.e., the ID data read control signal IRD remains inactive(IRD="0"). Thus, the operation of writing sector data upon the sixthsector of the track 132 is continued, and as a result, the magnetic headreaches the location G of the track 132, to thereby complete the writeoperation of sector data.

Thus, according to the magnetic disk controller 1 of FIG. 3, the datafrom the location F to the location G of the track 132 are erased by anerroneous write operation.

In FIG. 8, which illustrates a first embodiment of the present inventiona magnetic disk controller 1' further includes an inverter 13, an ANDcircuit 14, and a RS flip-flop 15, in addition to the elements of themagnetic disk controller 1 of FIG. 3. Also, the CPU 2 generates a resetsignal RST and transmits it to the sequencer 11 and the reset input ofRS flip-flop 15. Thus, the RS flip-flop 15 is reset as occasion demands.

In the magnetic disk controller 1' of FIG. 8, an inverted signal SMW ofthe sector mark waiting signal SMW and the sector mark detecting signalSMD are supplied to the AND circuit 14. Also, the output of the ANDcircuit 14 is supplied to the set input of the RS flip-flop 15. Theoutput Q of the RS flip-flop 15 generates a write operation stop signalSTP and transmits it to a sequencer 11'. As a result, when the writeoperation stop signal STP is active (STP="1"), the sequencer 11 stopsits write operation.

That is, each time the reset signal RST is made active ("1"), the RSflip-flop 15 is reset to deactivate the write operation stop signal STP.In this state, the sequencer 11' can generate write data. Also, in asector mark waiting state (SMW="1"), even when a sector mark is detectedto activate the sector mark detecting signal SMD, the output of the ANDcircuit 14 remains low ("0"), so that the RS flip-flop 15 is not set.Conversely, in a non-sector mark waiting state (SMW="0"), when a sectormark is detected to activate the sector mark detecting signal SMD, theoutput of the AND circuit 14 is changed from low ("0") to high ("1"),thus setting the RS flip-flop 15. As a result, the sequencer 11' stopsits write operation.

When no deviation of the location of the magnetic head 4 occurs, themagnetic disk controller 1' of FIG. 8 operates in the same way as themagnetic disk controller 1 of FIG. 3. On the other hand, when adeviation of the location of the magnetic head 4 occurs, the magneticdisk controller 1' is operated so as to reduce the amount of data erasedby an erroneous write operation.

For example, in a sector data write state at step 703 of FIG. 7, even ifthe magnetic head 4 is moved from the location E of the fifth sector ofthe track 131 to the location F of the sixth sector of the track 132,the operation of writing sector data in the sixth sector of the track132 continues. As a result, when the magnetic head 4 reaches thelocation D of the sixth sector of the track 132, a sector mark isdetected to activate the sector mark detecting signal SMD. In this case,since the inverted signal SMW of the sector mark waiting signal SMW isactive, the output of the AND circuit 14 becomes active ("1"), tothereby set the RS flip-flop 15. As a result, the write operation stopsignal STP is made active ("1"), and therefore, the sequencer 11' stopsthe write operation of sector data.

Thus, according to the magnetic disk controller 1' of FIG. 8, since thewrite operation is stopped just after an erroneous write operation isperformed upon the location F to the location D of the sixth sector ofthe track 132, the data from the location D to the location G of thesixth sector of the track 132 is not erased. In other words, the seventhsector of the track 132 is not destroyed, and the erasure of data by anerroneous write operation due to the deviation of the location of themagnetic head 2 occurs in at most one sector.

Also, in FIG. 8, since the output of the RS flip-flop 15 is supplied toan output terminal OUT, it can be recognized from the potential at theterminal OUT whether or not a deviation of the location of the magnetichead has occurred.

In FIG. 9, which illustrates a second embodiment of the presentinvention, a magnetic disk controller 1" includes OR circuits 17 and 18and AND circuits 19 and 20 in addition to the elements of the magneticdisk controller 1' of FIG. 8. In FIG. 9, the OR circuit 17 receives thesector mark waiting signal SMW and an index waiting signal IXW from asequencer 11" to generate a waiting signal W. The waiting signal Wserves as the sector mark waiting signal SMW of FIG. 8. Also, the ORcircuit 18 receives the sector mark detecting signal SMD and an indexdetecting signal IXD from the disk interface unit 3, to generate adetecting signal D. The detecting signal D serves as the sector markdetecting signal SMD of FIG. 8. Note that the index detecting signal IXDis generated at one revolution of the magnetic disk by using an opticalsensor or a magnetic sensor (not shown). The AND circuit 19 passes thesector mark detecting signal SMD when the sector mark waiting signal SMWis active ("1"). In this case, the passed sector mark detecting signalSMD is denoted by SMWD. Also, the AND circuit 20 passes the indexdetecting signal IXD when the index waiting signal IX is active ("1").In this case, the passed index detecting signal IXD is denoted by IXWD.

The sector mark waiting signal SMW of FIG. 9 is generated by a sequencer11" using the logic shown in FIG. 10 which is similar to that of FIG. 4.That is, in FIG. 10, step 402' is provided instead of step 402 of FIG.4. That is, in FIG. 9, the ID data read control signal IRD is derivedfrom the sector mark detecting signal SMD and the index detecting signalIXD, and it is impossible by the ID data read control signal IRD todiscriminate the sector detecting signal SMD from the index detectingsignal IXD. Therefore, in this case, an initialization for the firstsector mark detecting signal SMD is carried out by using the signal SMWDthrough the AND circuit 19.

The index waiting signal IXW is generated by the sequencer 11" using thelogic shown in FIG. 11, which is similar to FIG. 10. That is, an IXW,routine of FIG. 11 is initiated by turning ON the magnetic diskcontroller 1". Steps 1101 through 1104 carry out an initialization. Thatis, at step 1101, the index waiting signal IXW is made active ("1"), andat step 1102, the sequencer 11 waits for a first sector mark detectingsignal IXD which is, in this case, a first signal IXWD due to theactivation of the index waiting signal IXW. Once the first IXWD is madeactive, the control proceeds to step 1103 which makes the index waitingsignal IXW inactive. Then, at step 1104, an index interval value N2 isset in a counter CNT2. Thus, the counter CNT2 is initialized to becounted down by a time interrupt routine as illustrated in FIG. 12 whichis carried out at predetermined time intervals. Note that the indexinterval value N2 corresponds to an index interval T2 as shown in FIG.13A. Thus, an initialization for the first index detecting signal IXD(or IXWD) is completed.

At step 1105, it is determined whether or not the value of the counterCNT2 reaches zero, i.e., whether or not an index interval T2 has passed.Only when the index interval T2 has passed, does the control proceed tostep 1106 which activates the index waiting signal IXW (IXW="1") asshown in FIG. 13C.

At step 1107, an index interval value N2 is set in the counter CNT2.Also, at step 1108, an index waiting signal width value N3 is set in acounter CNT3. Thus, both the counters CNT2 and CNT3 are initialized tobe counted doom by the routine as illustrated in FIG. 12. Note that theindex waiting signal width value N3 corresponds to an index waitingsignal width T3 as shown in FIG. 13B.

At step 1108, it is determined whether or not the value of the counterCNT3 reaches zero, i.e., whether or not an index waiting signal width T3has passed. Only when the index waiting signal width T3 has passed, doesthe control proceed to step 1110 which deactivates the index waitingsignal IXW (IXW="0") as shown in FIG. 13C.

Hereinafter, steps 1105 through 1110 are repeated, and thus, the indexwaiting signal IXW as shown in FIG. 13C is repeatedly set and reset.

In FIG. 12, steps 1201 through 1206 are added to the routine of FIG. 5.That is, the counter CNT2 is decremented by 1 at step 1201, and thevalue of the counter CNT2 is guarded by 0 at steps 1202 and 1203.Similarly, the counter CNT3 is decremented by 1 at step 1204, and thevalue of the counter CNT3 is guarded by 0 at steps 1205 and 1206. Theroutine of FIG. 12 is completed by step 507.

In FIG. 9, note that the sequencer 11" is so well as the logic shown inFIG. 11, in parallel.

As explained hereinbefore, according to the present invention, when adeviation of the location of the magnetic head occurs due to thevibration of the magnetic disk unit or the like, the amount of erased ordestroyed data can be reduced.

I claim:
 1. A magnetic disk controller for a ZBR-type magnetic disk by amagnetic head, comprising:a sequencer for generating a sector markwaiting signal and an index waiting signal to wait for an index pulsesignal generated from said magnetic disk at every revolution thereof; adetecting means, connected to said magnetic head, for detecting a sectormark in said magnetic disk to generate a sector mark detecting signal; ameans for generating said index pulse signal; a first gate circuit,connected to said sequencer, for generating a waiting signal,transmitting it to said first and second gate circuits, when at leastone of said sector mark waiting signal and said index waiting signal isgenerated; a second gate circuit, connected to said sector markdetecting means and to said index pulse signal generating means, forgenerating a detecting signal, when at least one of said sector markdetecting signal and said index pulse signal is generated; a third gatecircuit, connected between said first and second gate circuits and saidsequencer, for generating an ID read signal and transmitting it to saidsequencer, when said waiting signal is generated and said detectingsignal is generated; and a fourth gate circuit, connected between saidfirst and second gate circuits and said sequencer, for generating a stopsignal and transmitting it to said sequencer, when said waiting signalis not generated and said detecting signal is generated, said sequencerperforming a write operation of sector data on said magnetic disk whenreceiving said ID read signal, said sequencer stopping the writeoperation of sector data from being performed when receiving said stopsignal.
 2. A magnetic disk controller as set forth in claim 1, furthercomprising a latch circuit, connected to said fourth gate circuit, forstoring an information indicating whether or not said sequencer hasstopped the write operation of sector data.
 3. A magnetic diskcontroller as set forth in claim 1, further comprising a fifth gatecircuit having one input connected to said sector mark waiting signal,another input connected to said sector mark detecting signal, and anoutput connected to said sequencer and generating a passed sector markdetecting signal only when both said sector mark detecting and saidsector mark waiting signals are generated.
 4. A magnetic disk controlleras set forth in claim 1, further comprising a sixth gate circuit havingan input connected to said index waiting signal, and another inputconnected to said index detecting signal, and an output connected tosaid sequencer and generating a passed index detecting signal only whenboth said index waiting and index detecting signals are generated.
 5. Amagnetic disk controller for a ZBR-type magnetic disk, comprising:meansfor setting a sector mark waiting state; means for resetting said sectormark waiting state; means for detecting a sector mark from said magneticdisk; means for performing a write operation of sector data upon saidmagnetic disk when said sector mark waiting state is set and a sectormark detecting signal is detected; and means for stopping said writeoperation from being performed when said sector mark waiting state isreset and a sector mark detecting signal is detected; means for settingan index waiting state to wait for an index pulse signal generated fromsaid magnetic disk at every revolution thereof; means for resetting saidindex waiting state; means for detecting said index pulse signal fromsaid magnetic disk; means for performing a write operation of sectordata on said magnetic disk when said index waiting state is set and anindex pulse signal is detected; and means for stopping said writeoperation from being performed when said index waiting state is resetand an index pulse signal is detected.